This invention relates to an image processing method and apparatus and an image display method and apparatus, more particularly to methods and apparatus that are useful for expanding and reducing digitized images, and for controlling edge sharpness.
Digital image expansion and reduction are processes that change the number of picture elements (pixels) in an image. These processes are often necessary. For example, an image generated in the widely used 640-by-480-pixel format may need to be expanded for display on a 1024-by-768-pixel liquid crystal screen, or reduced for display in a window occupying only part of that screen.
FIGS. 1A and 1B illustrate the conventional expansion of an image by a factor of three. The horizontal axis in these drawings represents a horizontal row of pixels in the image; the vertical axis represents the pixel data values, indicating pixel brightness levels. Before expansion, the row of pixels has segments (h) of uniform brightness, separated by edges (j, k) at which the brightness level changes, as shown in FIG. 1A. The conventional expansion process expands all of these segments and edges identically by a factor of three, so that the edges (j1, k1) in the expanded image, shown in FIG. 1B, are not as sharp as the edges in the original image.
The pixel values in the expanded picture are determined by interpolation, which is performed by a spatial filtering operation as illustrated in FIG. 2. The horizontal axis again represents horizontal position; the vertical axis now represents the value of an interpolation filter response characteristic F(x). If p(n) and p(n+1) are two consecutive pixels in the input image, q(n) is a pixel disposed at a position between them in the output image, the distance from p(n) to p(n+1) is equal to unity, and the distance from p(n) to q(m) is equal to r, then the brightness level of pixel q(m) is calculated as follows:q(m)=(F(r)×p(n))+(F(1−r)×p(n+1))
FIG. 3 illustrates schematically how this filtering calculation generates seven output pixels (q1 to q7) from three input pixels (p1 to p3).
The filter response characteristic need not be linear. An interpolation filter with a nonlinear characteristic, as illustrated in FIG. 4, is sometimes used to enhance the sharpness of edges (e.g., j1 and k1) in the output image. This type of edge enhancement, however, leads to further problems such as undershoot (pre-shoot) and overshoot.
Japanese Unexamined Patent Application No. 9-266531 discloses a scheme that provides several filter response characteristics, as illustrated in FIGS. 5A, 5B, and 5C, and switches among them according to the type of image area being processed. When this filter-switching scheme is used, however, there are problems of discontinuities at the points at which switching takes place.
Problems also occur when an image is reduced by conventional methods. The quality of edges is degraded because of pixel dropout.